#include "PantsuEngine.h"

using namespace Pantsu;

PantsuEngine *PantsuEngine::m_pIst = 0;

PantsuEngine::PantsuEngine() 
{

}

PantsuEngine::~PantsuEngine() {

}

void PantsuEngine::InitEngine( HINSTANCE i_hInstance ) {

	m_pRenderer = new PantsuRenderer( i_hInstance );
	m_pRenderer->CreateDevice( 0 );
}

void PantsuEngine::RenderOneFrame() {
		
	/* Render Frame */
	m_pRenderer->RenderOneFrame();
}

SceneManager *PantsuEngine::CreateSceneManager( char *i_scnmgr_id ) {

	SceneManager *sm = new SceneManager( i_scnmgr_id );
	m_SceneManagers[ 0 ] = sm;
	m_pRenderer->SetSceneManager( sm );	

	return sm;
}

void PantsuEngine::DeInitEngine() {
	m_pRenderer->DeInit();
	delete m_pRenderer;
}